﻿package com.PlantVsZombies.Zombies;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;

import com.PlantVsZombies.ui.PlantsMap;
import com.PlantVsZombies.util.ImageUtil;

public class LostHead implements Runnable{
	int x;
	int y;
	Image img = ImageUtil.LoadImage(new ImageIcon("images/image_zombies/Zombie/ZombieHead.gif"));
	public LostHead(int x , int y){
		this.x = x+50;
		this.y = y-20;
		PlantsMap.LostHead.add(this);
	}
	@Override
	public void run() {
		try {
			Thread.sleep(1500);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		PlantsMap.LostHead.remove(this);
	}
	public void paintHead(Graphics g){
		g.drawImage(img, x, y, null);
	}

}
